package com.tuzhi.filestore.http;

import com.dtflys.forest.annotation.Address;
import com.dtflys.forest.annotation.Get;
import com.dtflys.forest.annotation.Var;

import java.io.InputStream;

@Address(host = "${host_file}", port = "${port_file}")
public interface FileStoreOtherApi {

    /**
     * 下载文件 TuoDocument
     *
     * @param modelId
     * @return
     */
    @Get(value = "/fileStore/api/model/getDoc/{modelId}", headers = {
            "redirect:Y"
    })
    InputStream download(@Var("modelId") Long modelId);

    /**
     * 下载文件 tuovisual
     *
     * @param fileName
     * @return
     */
    @Get(value = "/fileStore/api/model/uploads/tuovisual/{fileName}", headers = {
            "redirect:Y"
    })
    InputStream tuovisual(@Var("fileName") String fileName);


    @Get(value = "/fileStore/file/down4fid/{fileUpLogId}", headers = {
            "redirect:Y"
    })
    InputStream downFile4FileUpLogId(@Var("fileUpLogId") Long fileUpLogId);

    @Get(value = "/fileStore/model/down/{type}/{modelId}", headers = {
            "redirect:Y"
    })
    InputStream downFileByFileType(@Var("modelId") Long modelId, @Var("type") String fileType);

}
